/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package Helper;

import ddf.minim.*;
import java.io.File;

/**
 *
 * @author Caliste
 */
public class FileHelper 
{    
    public static String GetFileExtension(File file) 
    {
        String name = file.getName();
        int lastIndexOf = name.lastIndexOf(".");
        if (lastIndexOf == -1) {
            return ""; // empty extension
        }
        return name.substring(lastIndexOf);
    }
    
}
